<template>
   <div class="container" >
    <input id="userName" >
    <button @click="add">add</button>
   </div>
</template>
<script>
   export default {
     name: '',
     data: function(){
       return {
        index:0
       }
     },
     methods:{
        add(){
            var vl = $("#userName").val();
            $("#userName").val(vl + this.index++);
        }
     }
   }
</script>
<style>
  html,
  body, 
  #app{
    height: 100%;
  }
</style>
<style scoped>
   .container {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      background-color: aliceblue;
   }
   .tr{
      width: 200px;
      flex-basis: 50px;
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      background-color: beige;
      align-items: center;
    }
   .second{
      background-color: aqua;
   }
</style>